using System;
using System.Collections.Generic;
using System.Text;

using TTDotNet.Util;
using System.Drawing;
using TTDotNet.Engine.ThreeDEngine;

namespace TTDotNet.Engine.Create.Tools
{
    public class Tool
    {
        protected Game game;
        protected ToolType toolType = ToolType.None;
        protected bool toolActive;
        protected bool cursorTool;

        public Tool(Game game, ToolType toolType)
        {
            this.game = game;
            this.toolType = toolType;
        }

        public ToolType Type
        {
            get { return toolType; }
        }

        public bool CursorTool
        {
            get { return cursorTool; }
            set { cursorTool = value; }
        }

        public bool Active
        {
            get { return toolActive; }
            set 
            { 
                toolActive = value;
                if (value)
                    OnActivated();
                else
                    OnDeactivated();
            }
        }


        public virtual void MouseDown(Point mouseLocation, GridPickData data) { }
        public virtual void MouseUp(Point mouseLocation, GridPickData data) { }
        public virtual void MouseMove(Point mouseLocation, GridPickData data) { }

        public virtual void OnActivated() { }
        public virtual void OnDeactivated() { }
    }
}
